﻿using Orchard.Localization;
using Orchard.UI.Navigation;

namespace Orchard.Commerce
{
    public class AdminMenu : INavigationProvider
    {
        public Localizer T { get; set; }

        public string MenuName { get { return "admin"; } }

        public void GetNavigation(NavigationBuilder builder)
        {
            builder.Add(T("Commerce"), "20",
                        menu => menu
                                    .Add(T("Manage Commerce"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.Commerce" }).Permission(Permissions.ManageCommerce))
                                    );
            builder.Add(T("Commerce"), "20",
                menu => menu
                        .Add(T("Manage Categories"), "2.0",
                            item => item
                                .Action("Index", "Category", new { area = "Orchard.Commerce" })));

        }
    }
}